package com.dd.ent.car.common.bean;

import android.text.TextUtils;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;

/**
 * 登录用户实体类
 *
 * @author liux (http://my.oschina.net/liux)
 * @version 1.0
 * @created 2012-3-21
 */
@DatabaseTable(tableName = "tb_user")
public class User implements Serializable {
    @DatabaseField(generatedId = true)
    private int id;
    @DatabaseField
    private String uid;
    @DatabaseField
    private String userName;
    @DatabaseField
    private String phoneNumber;
    @DatabaseField
    private String password;
    @DatabaseField
    private String avathor;
    @DatabaseField
    private String sex; //0代表男，1代表女

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAvathor() {
        return avathor;
    }

    public void setAvathor(String avathor) {
        this.avathor = avathor;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSexText() {
        if (TextUtils.equals(sex, "m")) {
            return "男";
        }

        return "女";
    }
}
